<{include file="header.html"}>

<script type="text/javascript">
	function transformNow(id)
	{
		confirmed = window.confirm('<{$smarty.const._MSG_TRANSFORM_TO_THIS_USER|utf8_escape_js}>');

		if (confirmed)
		{
			openwindow("<{$smarty.const.APPLICATION_URL|cat:'/login/login/'}>?act=<{$smarty.const.ACT_TRANSFORM}>&id=" + id);
		}
	}
</script>

	<div class="one_third">
		<div class="box_tool">
			<div class="box_head"><{$smarty.const._LB_TOOLBOX|utf8_escape_html}></div>
			<div class="box_content">
				<{if $smarty.session.userClasse == "user_support"}>
					<a href="<{$smarty.const.APPLICATION_URL}>/user_admin/form/?act=creer&amp;annonceur_id=0&amp;is_regie=<{$smarty.const.ADMIN_SUPPORT}>">
					<{$smarty.const._LB_ADD_SUPPORT|utf8_escape_html}></a>
				<{/if}>
			</div>
		</div>

		<div class="spacer"></div>
	<div class="box_tool">
		<div class="box_head"><{$smarty.const._LB_FILTER|utf8_escape_html}></div>
		<div class="box_content" id="filter_panel">
			<table>
			<tr>
				<td width="40%"><{$smarty.const._LB_NOM|utf8_escape_html}>&nbsp;:&nbsp;</td>
				<td width="60%">
					<input type="text" name="nom" id="nom" value="<{$nom|utf8_escape_html}>" style="width: 180px;"/>
				</td>
			</tr>
			<tr>
				<td class="submit" colspan="2" style="padding-top:10px;">
					<a class="tribullet" style="float:right" id="obj_search" href="#" onclick="javascript:getContent();"><{$smarty.const._LB_SEARCH}></a>
				</td>
			</tr>
			</table>
		</div>
	</div>
</div>

	<div class="two_third">
		<div class="box_two_third">
		<div class="box_head"><{$smarty.const._LB_USER_MANAGEMENT|utf8_escape_html}></div>
		<div class="box_content">
		<div>
		<{assign var="current_type" value="-1"}>

<{if $array_size > 0}>
	<{foreach from=$list_account item="account"}>
		<{if $account.USER_TYPE != $smarty.const.ACCOUNT_TYPE_ANNONCEUR && $account.USER_TYPE != $smarty.const.ACCOUNT_TYPE_AGENT && $account.USER_TYPE != $smarty.const.ACCOUNT_TYPE_REGIE}>
			<{if $account.ID == $smarty.session.userID}>
			<div class="object regie current" style="margin-left:15px">
			<{else}>
			<div class="object regie" style="margin-left:15px">
			<{/if}>
				<div class="head">
					<span class="right">
						<a href="<{$smarty.const.APPLICATION_URL}>/user_admin/change_password/?user_id=<{$account.ID}>">
							<img title="<{$smarty.const._LB_CHANGE_PASSWORD|utf8_escape_html}>" alt="" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_KEY_SMALL}>" class="small"/>
						</a>

						<a href="<{$smarty.const.APPLICATION_URL}>/user_admin/form/?annonceur_id=<{$account.ID|utf8_escape_html}>&amp;account_type=<{$account.USER_TYPE|utf8_escape_html}>">
							<img title="<{$smarty.const._LB_EDIT|utf8_escape_html}>" alt="" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_EDIT_SMALL}>" class="small"/>
						</a>
						<{if $account.ID != $smarty.session.userID}>
						<a onclick='return confirm("<{$smarty.const._LB_CONFIRM_SUPPORT_DELETION|utf8_escape_jshtml}><{$account.PRENOM|utf8_escape_jshtml}>&nbsp;<{$account.NOM|upper|utf8_escape_jshtml}>?");' href="<{$smarty.const.APPLICATION_URL}>/user_admin/form/?act=<{$smarty.const.ACT_DELETE}>&amp;annonceur_id=<{$account.ID|utf8_escape_html}>&amp;account_type=<{$account.USER_TYPE|utf8_escape_html}>&amp;ann_id=0">
							<img title="<{$smarty.const._LB_DELETE|utf8_escape_html}>" alt="" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_DELETE}>" class="small"/>
						</a>
						<{else}>
							<img alt="" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_DELETE_NOT}>" class="small"/>
						<{/if}>
					</span>

					<img alt="" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_REGIE_SMALL}>" class="small"/>
						<{$account.PRENOM|utf8_escape_html}>&nbsp;<{$account.NOM|upper|utf8_escape_html}>
				</div>

				<div class="content">
					<{$smarty.const._LB_EMAIL|utf8_escape_html}> : <{$account.EMAIL|utf8_escape_html}>
					<{if $account.DATE_LAST_LOGIN != "0000-00-00 00:00:00"}>
						<br /><{$smarty.const._LB_LAST_LOGIN|utf8_escape_html}>
						<{$account.DATE_LAST_LOGIN|utf8_escape_html|date_format:"%d/%m/%Y %H:%M:%S"}>&nbsp;
					<{else}>
						<br /><{$smarty.const._LB_NO_LAST_LOGIN|utf8_escape_html}>
					<{/if}>
				</div>
			</div>

		<{/if}>

	<{/foreach}>

<{else}>
	<{$smarty.const._LB_NO_ACCOUNT|utf8_escape_html}>
<{/if}>
	</div>
	</div>
	<div class="center" style="margin-top:15px;">
		<div class="pagination">
			<{if $array_size > 0}>
				<{$pager->display()}>
			<{/if}>
		</div>
	</div>

<script type="text/javascript">
	function getContent()
	{
		var nom = document.getElementById('nom');
		var obj_frm_filter = document.getElementById('frm_filter');

		var a_nom = nom.value;
		obj_frm_filter.action = '<{$smarty.const.APPLICATION_URL}>/user_admin/list/?a_nom=' + a_nom.replace("&", "%26");

		document.getElementById('a_nom').value = nom.value;
		obj_frm_filter.submit();
	}
</script>

<{** FORM for Filter **}>
<form id='frm_filter' method="post" action="">
	<input type="hidden" name="a_nom" id="a_nom" />
</form>

<{include file="footer.html"}>
